using System.ServiceModel;
using Bon_It.Model;

namespace Bon.It.Server.Interfaces
{
    /// <summary>
    /// contract contains only user methods.
    /// </summary>
    [ServiceContract]
    public interface IUserContract
    {
        /// <summary>
        /// Load all <see cref="Users"/>.
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        Users[] GetUsers();


        /// <summary>
        /// Get the <see cref="Bon_It.Model.Users"/> by the given name.
        /// </summary>
        /// <param name="username"></param>
        /// <returns></returns>
        [OperationContract]
        Users GetUserByUsername(string username);

        /// <summary>
        /// Save the <see cref="Bon_It.Model.Users"/>
        /// </summary>
        /// <param name="item"></param>
        /// <returns></returns>
        [OperationContract]
        Users PersistUser(Users item);

        /// <summary>
        /// Delete the given user from the database.
        /// </summary>
        /// <param name="item"></param>
        /// <returns></returns>
        [OperationContract]
        bool DeleteUser(Users item);


    }
}
